Integrand size = 31, antiderivative size = 217 \[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=-\frac {c^3 (b B (1-m)+a A (2-m)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^{-3+m} \sin (e+f x)}{f (1-m) (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {(A b+a B) c^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-m}{2},\frac {4-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^{-2+m} \sin (e+f x)}{f (2-m) \sqrt {\sin ^2(e+f x)}}-\frac {a A c^2 (c \sec (e+f x))^{-2+m} \tan (e+f x)}{f (1-m)} \]
[Out]
Time = 0.52 (sec) , antiderivative size = 217, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3039, 4082, 3872, 3857, 2722} \[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=-\frac {c^3 \sin (e+f x) (a A (2-m)+b B (1-m)) (c \sec (e+f x))^{m-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right )}{f (1-m) (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {c^2 (a B+A b) \sin (e+f x) (c \sec (e+f x))^{m-2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-m}{2},\frac {4-m}{2},\cos ^2(e+f x)\right )}{f (2-m) \sqrt {\sin ^2(e+f x)}}-\frac {a A c^2 \tan (e+f x) (c \sec (e+f x))^{m-2}}{f (1-m)} \]
[In]
[Out]
Rule 2722
Rule 3039
Rule 3857
Rule 3872
Rule 4082
Rubi steps \begin{align*} \text {integral}& = c^2 \int (c \sec (e+f x))^{-2+m} (b+a \sec (e+f x)) (B+A \sec (e+f x)) \, dx \\ & = -\frac {a A c^2 (c \sec (e+f x))^{-2+m} \tan (e+f x)}{f (1-m)}-\frac {c^2 \int (c \sec (e+f x))^{-2+m} (-b B (1-m)-a A (2-m)-(A b+a B) (1-m) \sec (e+f x)) \, dx}{1-m} \\ & = -\frac {a A c^2 (c \sec (e+f x))^{-2+m} \tan (e+f x)}{f (1-m)}+((A b+a B) c) \int (c \sec (e+f x))^{-1+m} \, dx+\frac {\left (c^2 (b B (1-m)+a A (2-m))\right ) \int (c \sec (e+f x))^{-2+m} \, dx}{1-m} \\ & = -\frac {a A c^2 (c \sec (e+f x))^{-2+m} \tan (e+f x)}{f (1-m)}+\left ((A b+a B) c \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m\right ) \int \left (\frac {\cos (e+f x)}{c}\right )^{1-m} \, dx+\frac {\left (c^2 (b B (1-m)+a A (2-m)) \left (\frac {\cos (e+f x)}{c}\right )^m (c \sec (e+f x))^m\right ) \int \left (\frac {\cos (e+f x)}{c}\right )^{2-m} \, dx}{1-m} \\ & = -\frac {(A b+a B) \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2-m}{2},\frac {4-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^m \sin (e+f x)}{f (2-m) \sqrt {\sin ^2(e+f x)}}-\frac {(b B (1-m)+a A (2-m)) \cos ^3(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-m}{2},\frac {5-m}{2},\cos ^2(e+f x)\right ) (c \sec (e+f x))^m \sin (e+f x)}{f (1-m) (3-m) \sqrt {\sin ^2(e+f x)}}-\frac {a A c^2 (c \sec (e+f x))^{-2+m} \tan (e+f x)}{f (1-m)} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.75 \[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\frac {\cot (e+f x) \left (b B (-1+m) m \cos ^2(e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+m),\frac {m}{2},\sec ^2(e+f x)\right )+(-2+m) \left ((A b+a B) m \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+m),\frac {1+m}{2},\sec ^2(e+f x)\right )+a A (-1+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(e+f x)\right )\right )\right ) (c \sec (e+f x))^m \sqrt {-\tan ^2(e+f x)}}{f (-2+m) (-1+m) m} \]
[In]
[Out]
\[\int \left (a +b \cos \left (f x +e \right )\right ) \left (A +\cos \left (f x +e \right ) B \right ) \left (c \sec \left (f x +e \right )\right )^{m}d x\]
[In]
[Out]
\[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int \left (c \sec {\left (e + f x \right )}\right )^{m} \left (A + B \cos {\left (e + f x \right )}\right ) \left (a + b \cos {\left (e + f x \right )}\right )\, dx \]
[In]
[Out]
\[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
\[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int { {\left (B \cos \left (f x + e\right ) + A\right )} {\left (b \cos \left (f x + e\right ) + a\right )} \left (c \sec \left (f x + e\right )\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (a+b \cos (e+f x)) (A+B \cos (e+f x)) (c \sec (e+f x))^m \, dx=\int {\left (\frac {c}{\cos \left (e+f\,x\right )}\right )}^m\,\left (A+B\,\cos \left (e+f\,x\right )\right )\,\left (a+b\,\cos \left (e+f\,x\right )\right ) \,d x \]
[In]
[Out]